package com.sze.volanmenetrendgyor;

import java.util.ArrayList;

import android.content.Context;
import android.database.SQLException;
import android.os.AsyncTask;

import com.google.gson.JsonIOException;
import com.google.gson.JsonSyntaxException;

public class StationListTask extends AsyncTask<Context, Void, ArrayList<StationClass>> {
	Exception ex;
	@Override
	protected ArrayList<StationClass> doInBackground(Context... params) {
		try {
			DbConnector mDbConnector = DbConnector.getInstance(params[0]);
			mDbConnector.open();

			ArrayList<StationClass> stationList = mDbConnector.getStationsData();
			return stationList;
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		} catch (JsonIOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (JsonSyntaxException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
		
		
		return null;
	}
}
